Moves the current document to the specified folder.
Syntax
MoveTo(TargetFolder As IASFolder3, [Options As Long = 0])
Remarks
This method does nothing if the document already resides in the target folder. This method does not support Field-Path definition levels.
When this method is called, any property values set by code are reset to their original values.
If this method is used in event procedures such as DocGenericEvent_AfterNewDocument, an unhandled exception Cannot delete a relation. The object is already being edited by another session can occur. This can happen if the folder to which the document is being moved is locked, such as by another new document wizard in use by another user at the same time.
For the wizard events to occur for this method, the MoveEvents setting in the [ScriptEvents] section on the Application Integration tab of Application Settings in Configurator must be set to Y (default).
Tip To use this method to move documents to folders that users are not granted Create Document privilege, grant them the Create Document from Script privilege for the destination folder. The privilege may only be granted for custom folder types , not normal folders.
Related concepts